Skip to main content
Version: DAI 7.1

Start Model Execution

The Start Execution endpoint allows you to automate the execution of a model run.

In the POST request, you can enter parameter values to control the configuration of a model run, for example, which suite of snippets to run. You must specify the:

  • model_id for an exploratory run, which is useful when you're building a model.
  • model_id and test_case_id for a fully-configured model. If you start a run with only these two parameters, the model runs without connecting to any Eggplant Functional scripts and only generates a path through the model.
note

If you want to connect to an Eggplant Functional suite, you must use the agent to establish that connection, and give values for the parameters in the agent object.

Method

POST -> http://localhost:8000/execution_service/api/v1/executions

You can also explore the Start Execution endpoint in Swagger:

http://localhost:8000/execution_service/docs#/Execution/start_execution_execution_service_api_v1_executions_post

Headers

NameValue
Authorizationbearer <access_token>
Content-Typeapplication/json

Body Parameters

To execute a model run, you must send a value for at least one of these parameters: model_id, rerun_id or script.

NameTypeDescriptionRequired
execution_typeenumerationFor an execution run, the value is always executing.
model_idstringUUID of the model to use for an exploratory or test case run.Yes
agentobjectAgent that is used for the model run.No. If null then no agent is used.
  agent_idstringID of the agent connection to use.No
  is_hosted_agentbooleanWhether the agent is hosted or on the local machine.No
test_case_idintegerID of the test case to execute for a test case run.No
scriptstringName of the script to use for a script-based run.No
assetobjectDetails of the test assets to use for test execution.No. If null then a model run without snippets is executed.
  asset_version_idstringID of the asset version to use.No
  asset_pathstringPath of the suite to use on the connected agent.No
sutobjectDetails of the SUT to use.No
  sut_idstringID of the SUT.No
  criteriaarray of stringsCriteria or tag of the SUT to lock. You can use this instead of the sut_id.No
rerun_idintegerFor a rerun, this is the test case ID of the original model run.No
step_pause_timeintegerFor internal use only.No

Possible Responses

StatusStatus TextDescription
200Successful responseExecution started.
400Bad requestRequired parameters were not sent.
401UnauthorizedThe access token was not valid.
403Access deniedServer denies access from the resource.
422Validation errorIncorrect parameters were sent.
503RabbitMQ is not availableRequest cannot be completed because the message service is unavailable.

Response Body JSON

Successful response – Status 200 returns the ID of the model execution that has started.

Example:

{
"execution_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}